package net.taviscaron.drivenotes.api;

import java.util.Map;
import net.taviscaron.drivenotes.api.action.ApiAction;
import org.springframework.beans.factory.annotation.Required;

/**
 * Api action factory
 * @author Andrei Senchuk
 */
public class ApiActionFactory {
    private Map<String, ApiAction> actions;

    @Required
    public void setActions (Map<String, ApiAction> actions) {
        this.actions = actions;
    }

    public ApiAction getAction (String name) {
        return actions.get(name);
    }
}
